package com.dankegongyu.lib.share.bean;

import android.app.Activity;

import com.dankegongyu.lib.share.DKShareCallback;
import com.dankegongyu.lib.share.DKShareUtil;
import com.dankegongyu.lib.share.DK_SHARE_MEDIA;

/**
 * 只分享文字
 *
 * @author wupuquan
 * @version 1.0
 * @since 2018/3/12 17:33
 */
public class DKShareText extends DKShareObject<DKShareText> {

    private DKShareText(Activity activity) {
        super(activity);
    }

    public static DKShareText with(Activity activity) {
        return new DKShareText(activity);
    }

    @Override
    public void show() {
        DKShareUtil.shareDefault(this, null);
    }

    @Override
    public void show(DKShareCallback shareCallback) {
        DKShareUtil.shareDefault(this, shareCallback);
    }

    @Override
    public DKShareText setShareContent(String shareContent) {
        return super.setShareContent(shareContent);
    }

    @Override
    public String getShareContent() {
        return super.getShareContent();
    }

    @Override
    public void shareDirect(DK_SHARE_MEDIA dk_share_media) {
        shareDirect(dk_share_media, null);
    }

    @Override
    public void shareDirect(DK_SHARE_MEDIA dk_share_media, DKShareCallback shareCallback) {
        DKShareUtil.share(dk_share_media.getName(), this, shareCallback);
    }

    @Override
    public DKMediaType getShareMedia() {
        return DKMediaType.TEXT;
    }

}
